package tmp;

// Generated 04-nov-2009 18:40:40 by Hibernate Tools 3.2.4.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ExpedientTypePhases generated by hbm2java
 */
@Entity
@Table(name = "expedient_type_phases", catalog = "fmanzano_gem")
public class ExpedientTypePhases implements java.io.Serializable {

	private ExpedientTypePhasesId id;
	private Phase phase;
	private ExpedientType expedientType;
	private String tfaNameKo;
	private String tfaNameOk;
	private Boolean tfaNextFixed;
	private Boolean tfaNextKo;
	private Boolean tfaNextOk;
	private Set<Profile> profiles = new HashSet<Profile>(0);

	public ExpedientTypePhases() {
	}

	public ExpedientTypePhases(ExpedientTypePhasesId id, Phase phase,
			ExpedientType expedientType) {
		this.id = id;
		this.phase = phase;
		this.expedientType = expedientType;
	}

	public ExpedientTypePhases(ExpedientTypePhasesId id, Phase phase,
			ExpedientType expedientType, String tfaNameKo, String tfaNameOk,
			Boolean tfaNextFixed, Boolean tfaNextKo, Boolean tfaNextOk,
			Set<Profile> profiles) {
		this.id = id;
		this.phase = phase;
		this.expedientType = expedientType;
		this.tfaNameKo = tfaNameKo;
		this.tfaNameOk = tfaNameOk;
		this.tfaNextFixed = tfaNextFixed;
		this.tfaNextKo = tfaNextKo;
		this.tfaNextOk = tfaNextOk;
		this.profiles = profiles;
	}

	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "texId", column = @Column(name = "TEX_ID", nullable = false)),
			@AttributeOverride(name = "fasId", column = @Column(name = "FAS_ID", nullable = false)) })
	public ExpedientTypePhasesId getId() {
		return this.id;
	}

	public void setId(ExpedientTypePhasesId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "FAS_ID", nullable = false, insertable = false, updatable = false)
	public Phase getPhase() {
		return this.phase;
	}

	public void setPhase(Phase phase) {
		this.phase = phase;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TEX_ID", nullable = false, insertable = false, updatable = false)
	public ExpedientType getExpedientType() {
		return this.expedientType;
	}

	public void setExpedientType(ExpedientType expedientType) {
		this.expedientType = expedientType;
	}

	@Column(name = "TFA_NAME_KO", length = 250)
	public String getTfaNameKo() {
		return this.tfaNameKo;
	}

	public void setTfaNameKo(String tfaNameKo) {
		this.tfaNameKo = tfaNameKo;
	}

	@Column(name = "TFA_NAME_OK", length = 250)
	public String getTfaNameOk() {
		return this.tfaNameOk;
	}

	public void setTfaNameOk(String tfaNameOk) {
		this.tfaNameOk = tfaNameOk;
	}

	@Column(name = "TFA_NEXT_FIXED")
	public Boolean getTfaNextFixed() {
		return this.tfaNextFixed;
	}

	public void setTfaNextFixed(Boolean tfaNextFixed) {
		this.tfaNextFixed = tfaNextFixed;
	}

	@Column(name = "TFA_NEXT_KO")
	public Boolean getTfaNextKo() {
		return this.tfaNextKo;
	}

	public void setTfaNextKo(Boolean tfaNextKo) {
		this.tfaNextKo = tfaNextKo;
	}

	@Column(name = "TFA_NEXT_OK")
	public Boolean getTfaNextOk() {
		return this.tfaNextOk;
	}

	public void setTfaNextOk(Boolean tfaNextOk) {
		this.tfaNextOk = tfaNextOk;
	}

	@ManyToMany(fetch = FetchType.LAZY, mappedBy = "unresolved")
	public Set<Profile> getProfiles() {
		return this.profiles;
	}

	public void setProfiles(Set<Profile> profiles) {
		this.profiles = profiles;
	}

}
